<?php
session_start();

class vue_membre{
	


	public static function infosMembre($tab){

		
			echo " <form action='' action='post' ";
				echo "Nom : ". $_SESSION['nom'] ."<input type='text' name='nom'/> <br/>";
				echo "Prenom :". $_SESSION['prenom'] ." <input type='text' name='prenom'/> <br/>";
				echo "Identifiant :" .$_SESSION['identifiant']. ": <input type='text' name='identifiant'/> <br/>";
				echo "Age : " .$_SESSION['age']. "<input type='number' name='age' />";
								
				echo "<input type='text' value='Connexion'/>";
			echo "</form>";
	}


	//@param requete liste d'amis
	public static function supprimerAmi($tab){

		echo " <form action='' action='get' ";

			echo "Liste Amis : <select name='id'> <br/>";
				foreach ($tab as $key => $value) {
							echo "<option value='$key'> " .$value['identifiant']. " | " .$value['nom']. "<br/>";
				}

			echo "</select>";
			echo "<input type='submit' value='Supprimer' />";

		echo "</form>";

	}

	public static function modiferInfos($id){


			echo " <form action='' action='post' ";
				echo "Nom : ". $_SESSION['nom'] ."<input type='text' name='nom'/> <br/>";
				echo "Prenom :". $_SESSION['prenom'] ." <input type='text' name='prenom'/> <br/>";
				echo "Identifiant :" .$_SESSION['identifiant']. ": <input type='text' name='identifiant'/> <br/>";
				echo "Age : " .$_SESSION['age']. "<input type='number' name='age' />";
								
				echo "<input type='text' value='Connexion'/>";
			echo "</form>";

	}


	//voir la liste d'amis 
	public static function listeAmis($tab){

		foreach ($tab as $key => $value) {
			echo "Nom : " . $value['identifiant']  . " Prenom : " .$value['age']."<br/>";
		}
	}

	//voir la liste de jeux
	public static function listeJeu($id){
		foreach ($tab as $key => $value) {
			echo "Jeu : " . $value['jeu'] . " Plateforme : " .$value['plateforme']. "<br/>";
		}
	}


	//modifier le mot de passe 
	public static function modifierInfosImportantes($id){

		echo "<form action='' method='post' >";
			echo " Saisissez votre nouveau mot de passe : <input type='text' name='mdp' />";
		echo "</form>";
	}


	//ajouter ami parmi une liste d'amis inscrit
	public static function ajouterAmi($tab){

			echo "Ajoutez un ami : ";
			echo "Identifiant | Nom | Prenom | Age | Jeux Favoris ";
			echo " <form action='' action='post' ";
				
					
					foreach ($tab as $key => $value) {
						echo " <td value='$key' >". $value['identifiant'] . " |  "  .$value['nom']. " ". $value['prenom'] . " |  "  .$value['age']. " " .$value['jeu'] ." <br/>";			
						
						 
					}	

			echo "</td>";

			echo "<input name='submit' value='Ajouter' />";

			echo "</form>"; 
	}
}

?>